package com.ysp;

/**
 * 双重检测：这个可以使用
 */


/**
 * @author ysp
 */
public class Singleton03 {

    private static volatile Singleton03 singleton03=null;

    private Singleton03(){}

    public static Singleton03 getInstance(){
        if(singleton03==null){
            synchronized (Singleton03.class){
                if(singleton03==null){
                    singleton03 = new Singleton03();
                }
            }
        }
        return singleton03;
    }
}
